home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Tool Chest / Development Kits / MPW etc. / MPW-GM / Interfaces&Libraries / Interfaces / CIncludes / CMCalibrator.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-17  |  3.0 KB  |  100 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMCalibrator.h
  3.  
  4.      Contains:    ColorSync Calibration API
  5.  
  6.      Version:    Technology:    ColorSync 2.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __CMCALIBRATOR__
  19. #define __CMCALIBRATOR__
  20.  
  21. #ifndef __CMAPPLICATION__
  22. #include <CMApplication.h>
  23. #endif
  24. #ifndef __DISPLAYS__
  25. #include <Displays.h>
  26. #endif
  27. #ifndef __ERRORS__
  28. #include <Errors.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53. typedef CALLBACK_API( void , CalibrateEventProcPtr )(EventRecord *event);
  54. typedef STACK_UPP_TYPE(CalibrateEventProcPtr)                     CalibrateEventUPP;
  55.  
  56. struct CalibratorInfo {
  57.     AVIDType                         displayID;
  58.     CMProfileLocation                 profileLocation;
  59.     CalibrateEventUPP                 eventProc;
  60.     UInt32                             reserved;
  61.     UInt32                             flags;
  62.     Boolean                         isGood;
  63.     SInt8                             byteFiller;
  64. };
  65. typedef struct CalibratorInfo            CalibratorInfo;
  66. typedef CALLBACK_API( Boolean , CanCalibrateProcPtr )(AVIDType displayID);
  67. typedef CALLBACK_API( OSErr , CalibrateProcPtr )(CalibratorInfo *theInfo);
  68. typedef STACK_UPP_TYPE(CanCalibrateProcPtr)                     CanCalibrateUPP;
  69. typedef STACK_UPP_TYPE(CalibrateProcPtr)                         CalibrateUPP;
  70. enum { uppCalibrateEventProcInfo = 0x000000C0 };                 /* pascal no_return_value Func(4_bytes) */
  71. enum { uppCanCalibrateProcInfo = 0x000000D0 };                     /* pascal 1_byte Func(4_bytes) */
  72. enum { uppCalibrateProcInfo = 0x000000E0 };                     /* pascal 2_bytes Func(4_bytes) */
  73. #define NewCalibrateEventProc(userRoutine)                         (CalibrateEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCalibrateEventProcInfo, GetCurrentArchitecture())
  74. #define NewCanCalibrateProc(userRoutine)                         (CanCalibrateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCanCalibrateProcInfo, GetCurrentArchitecture())
  75. #define NewCalibrateProc(userRoutine)                             (CalibrateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCalibrateProcInfo, GetCurrentArchitecture())
  76. #define CallCalibrateEventProc(userRoutine, event)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppCalibrateEventProcInfo, (event))
  77. #define CallCanCalibrateProc(userRoutine, displayID)             CALL_ONE_PARAMETER_UPP((userRoutine), uppCanCalibrateProcInfo, (displayID))
  78. #define CallCalibrateProc(userRoutine, theInfo)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppCalibrateProcInfo, (theInfo))
  79.  
  80. #if PRAGMA_STRUCT_ALIGN
  81.     #pragma options align=reset
  82. #elif PRAGMA_STRUCT_PACKPUSH
  83.     #pragma pack(pop)
  84. #elif PRAGMA_STRUCT_PACK
  85.     #pragma pack()
  86. #endif
  87.  
  88. #ifdef PRAGMA_IMPORT_OFF
  89. #pragma import off
  90. #elif PRAGMA_IMPORT
  91. #pragma import reset
  92. #endif
  93.  
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97.  
  98. #endif /* __CMCALIBRATOR__ */
  99.  
  100.